#ifndef HISTORYMANAGER_H
#define HISTORYMANAGER_H

#include "global.h"
#include <QVector>
#include "configmanager.h"
class HistoryManager
{
public:

    static HistoryManager& getInstance() {
        return instance;
    }


     // 添加历史记录
    void addHistory(UrlInfo urlInfo);

    // 获取所有历史记录信息
    const QVector<UrlInfo>& getAllHistories(){return histories;}

    // 清除历史记录
    void clearHistory();

private:
    QVector<UrlInfo> histories;
    static HistoryManager instance;
    HistoryManager();
    ~HistoryManager(){};
    HistoryManager(const HistoryManager&)=delete;
    HistoryManager& operator=(const HistoryManager&)=delete;

};

#endif // HISTORYMANAGER_H
